﻿using SoftHelper.Tool;
using SoftHelper.View;
using System.Windows.Controls;

namespace SoftHelper.ViewModel
{
    public class ChoseSoftDirViewModel
    {
       

        public ChoseSoftDirViewModel()
        {
            
        }
        public RalyCommand ChoseProject
        {
            get
            {
                return new RalyCommand((o) =>
                {
                    System.Windows.Forms.FolderBrowserDialog dialog = new System.Windows.Forms.FolderBrowserDialog();
                    TextBlock textBlock = o as TextBlock;
                    dialog.ShowDialog();
                    textBlock.Text = dialog.SelectedPath;
                   
                }, x => true);
            }
        }

        public RalyCommand Up
        {
            get
            {
                return new RalyCommand((o) =>
                {
                    MainViewModel.ChangeFragment(-1);
                },x=>true);
            }
        }


        public RalyCommand Next
        {
            get
            {
                return new RalyCommand((o) =>
                {
                    MainViewModel.ChangeFragment(1);
                }, x => true);
            }
        }
    }
}
